const express = require('express')
const router = express.Router()
const infoHandler = require('../router_handler/userinfo')

// 自动验证表单数据的中间件
const expressJoi = require('@escook/express-joi')
// 需要的验证规则
const {userInfo} = require("../schema/user")

router.get('/userinfo', infoHandler.getInfo)
router.post('/userinfo', expressJoi(userInfo), infoHandler.updataInfo)

module.exports = router